About macros
A macro is a list of tag assignments stored in a text file, in the format <tag>=<value>. Each assignment assigns a value to a tag. The value can be in the form of another tag, an expression, a numeric constant, or a string. Whenever you run the macro, the specified values are written to the tags.
Use macros in these editors:
- Startup - assign project startup and shutdown macros.
- Graphics - assign startup and shutdown macros to graphic displays in the Display Settings dialog box of this editor.
- Runtime Security - assign login and logout macros to users.
- Global connections - assign macros to up to five global connections. Macros are run when an expression result or tag value changes.
At run time, the tag assignments in the macro file are run asynchronously, that is, the system does not wait for the completion of one tag assignment before running the next.
Tip: |
- Because macros are not necessarily executed in the order in which they are listed, do not rely on the order of execution to control your process.
- To run a specified macro at run time, create a macro button and assign the macro to the button. When the operator presses the button at run time, the macro is executed.
- When renaming macro files, make sure you update any references to that macro file (for example, in Runtime Security, Display Settings, or the Startup editor) to the new name.
|
See also
Create macros
Causes of run-time errors for macros
Example: Use macros
Configure startup settings
The Graphics editor
ME Runtime 3.20 and earlier tab
Set up global connections
Keywords: macro